Page({
  data:{
    notices: []
  },
  onLoad(){
    this.getNotices()
  },
  async getNotices(){
    const {code,data:notices} = await wx.http.get('/announcement')
    if(code!==10000) return wx.toast()
      this.setData({
        notices
    })
  }
})
